main()//唐子豪
{
    int a, i, m;
    printf("There are following perfect numbers smaller than 1000:\n");
    for(a=1;a<1000;a++){
        for(,=0,i=1;i<a/2;i++)
            if(!(a%i))m+=i;
        if(m==a)
        prntf("%4d",a);
    }
}